const Sequelize = require("sequelize");
const sequelize = require("../dbConn.js");

const { STRING, INTEGER, DATE, BIGINT, TEXT } = Sequelize;

class NewsModel extends Sequelize.Model{}

NewsModel.init({
  news_id: {
    type: STRING,
    allowNull: false,
    primaryKey: true,
    unique: true
  },
  news_title: STRING,
  news_source: STRING,
  news_type: STRING,
  news_detail: TEXT,
  news_img: STRING,

},{
  sequelize,
  modelName: "NewsModel"
});


module.exports = {
  NewsModel
};